import request from "@/utils/request";

// 任务类型列表
export function earnTasktype(query) {
  return request({
    url: '/admin/earnTask/type/list',
    method: 'get',
    params: query
  })
}

// 任务列表
export function earnTasklist(query) {
  return request({
    url: '/admin/earnTask/list',
    method: 'get',
    params: query
  })
}

// 赚钱任务发布/编辑


export function saveOrUpdate(data) {
  return request({
    url: "/admin/earnTask/saveOrUpdate",
    method: "post",
    data: data
  });
}


// 删除赚钱任务
export function earnTask(data) {
  return request({
    url: '/admin/earnTask/' + data,
    method: 'delete'
  })
}

// 用户赚钱任务/admin/earnTask/user/list
export function earnTaskuserlist(query) {
  return request({
    url: '/admin/earnTask/user/list',
    method: 'get',
    params: query
  })
}

// // 任務审核
export function earnTaskuseraudit(data) {
  return request({
    url: '/admin/earnTask/user/audit',
    method: 'post',
    data: data,
  })
}

// //任務上下架
export function changeStatus(data) {
  return request({
    url: '/admin/earnTask/changeStatus',
    method: 'put',
    data: data,
  })
}

// 图片上传
export function uploadimg(data) {
  return request({
    url: '/admin/upload/uploadImg/2',
    method: 'post',
    data: data
  })
}






